namespace Ds.DataBase.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class UpdateDeFenBiao : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.KaoHeDeFenHuiZongs",
                c => new
                    {
                        dfid = c.Int(nullable: false, identity: true),
                        username = c.String(),
                        gzjhdf = c.Decimal(nullable: false, precision: 18, scale: 2),
                        jxdf = c.Decimal(nullable: false, precision: 18, scale: 2),
                        fjx = c.Decimal(nullable: false, precision: 18, scale: 2),
                        mkhbid = c.Int(nullable: false),
                        jxmblx = c.Int(nullable: false),
                        cjsj = c.DateTime(nullable: false),
                        KaoHeDeFenHuiZong_dfid = c.Int(),
                    })
                .PrimaryKey(t => t.dfid)
                .ForeignKey("dbo.KaoHeDeFenHuiZongs", t => t.KaoHeDeFenHuiZong_dfid)
                .Index(t => t.KaoHeDeFenHuiZong_dfid);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.KaoHeDeFenHuiZongs", "KaoHeDeFenHuiZong_dfid", "dbo.KaoHeDeFenHuiZongs");
            DropIndex("dbo.KaoHeDeFenHuiZongs", new[] { "KaoHeDeFenHuiZong_dfid" });
            DropTable("dbo.KaoHeDeFenHuiZongs");
        }
    }
}
